// 活动管理相关类型
export interface Activity {
  id: number;
  name: string;
  description: string;
  image: string;
  original_price: number;    // 分
  group_price: number;       // 分
  start_time: number;        // 时间戳 (秒)
  end_time: number;          // 时间戳 (秒)
  min_members: number;
  max_members: number;
  limit_per_member: number;
  support_balance: boolean;
  deductible_hours: number;
  applicable_stores: number[];
  applicable_venues: number[];
  available_weekdays: number[]; // 0-6
  available_times: { start_time: string; end_time: string }[];
  sort_order: number;
  status: number;
  created_at?: number;
  updated_at?: number;
}

export interface ActivityQuery {
  page?: number;
  pageSize?: number;
  keyword?: string;
  status?: number;
}

// 订单管理相关类型
export interface Order {
  id: number;
  order_no: string;
  activity_name: string;
  username: string;
  quantity: number;
  amount: number;       // 分
  group_status: number;
  status: number;
  created_at: number;   // 时间戳 (秒)
  paid_at?: number;
  address?: string;
  remark?: string;
}

export interface OrderQuery {
  page?: number;
  pageSize?: number;
  keyword?: string;
  order_no?: string;
  activity_name?: string;
  username?: string;
  status?: number;
  group_status?: number;
  startTime?: string;
  endTime?: string;
}

// 统计分析相关类型
export interface StatisticsData {
  totalActivities: number;
  totalOrders: number;
  totalRevenue: number;  // 分
  [key: string]: any;
}

// 核销管理相关类型
export interface VerifyRecord {
  id: number;
  group_buy_order_id: number;
  orderNo: string;
  username: string;
  orderAmount: number;   // 分
  verifyTime: number;    // 时间戳 (秒)
  storeName: string;
  operatorName: string;
  remark?: string;
}

export interface VerifyQuery {
  page?: number;
  pageSize?: number;
  keyword?: string;
}

export interface VerifyListData {
  list: VerifyRecord[];
  total: number;
}